//鸡兔同笼问题：今有雉兔同笼，上有三十五头，下有九十四足，问雉兔各几何？
 
#include <stdio.h>
int main(){
	int head = 0;
	int foot = 0;
	printf("输入鸡和兔头一共：");
	scanf("%d",&head);
	printf("输入鸡和兔脚一共：");
	scanf("%d",&foot);

	printf("兔子有：%d只\n",(foot-head*2)/2);
	printf("鸡有：%d只\n",head-((foot-head*2)/2));

	return 0;
}
